home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Experimental BBS Explossion 3
/
Experimental BBS Explossion III.iso
/
gus
/
sdkdigv8.zip
/
SDKV8N23.TXT
< prev
next >
Wrap
Text File
|
1994-01-28
|
8KB
|
283 lines
Apparently-To: john.smith@gravis.com
GUS Programmer's Digest Fri, 28 Jan 94 4:09 Volume 8: Issue 23
Today's Topics:
Documentation
FAST UltraPoke
Reading voice while playing it - strange side effects
Subscribe (2 msgs)
Standard Info:
- Meta-info about the GUS can be found at the end of the Digest.
- Before you ask a question, please READ THE FAQ.
----------------------------------------------------------------------
Date: Thu, 27 Jan 94 14:21:14 EST
From: jdimich@ajiant.dnet.dupont.com
Subject: Documentation
I was just wondering if there was something wrong with the documentation in
the SDK v2.10. It almost seems like the .doc files have been corrupted, and I
recall seeing a postscript version of them somewhere, but I can not recall
where. Could someone please inform me of the problem or of where I can get
some working documentation? I tried every word processor I have, but nothing
would work. Is it possible to maybe send me some non-corrupted documentation?
Sincerely,
Jason DiMichele
jdimich@ajiant.dnet.dupont.com
------------------------------
Date: Thu, 27 Jan 1994 13:21:42 +0100 (MET)
From: appel@stack.urc.tue.nl (Stanley Appel)
Subject: FAST UltraPoke
Hi,
There is a routine i designed to transfer data into GUS DRAM without
DMA (I have a OPTI). There is some smart I/O in it that makes it
extreme FAST.
I did some benchmarks with it on my 486sx/25
UltraPokeData : 47KByte/Sec
GusPoke (mine) : 75KByte/Sec
GusWrite (this) : 203KByte/Sec
So i think it is worth posting in the SDK mailing list.
Maybe Some Other people whant to use it in there own progs.
- Metal (with -nodma switch)
- DMP
- etc.
The defintion of the function is :
procedure GusWrite (Address : LongInt; var Buffer; Count : Word);
Address -> Start position in GUS DRAM
Buffer -> linear array of bytes or words
Count -> How many bytes !!! or SIZEOF(Buffer) !!!
There are 4 extra variables needed in your programma
GF1_REG_SELECT : Word; { GUSBASE + $103 }
The address of the GUS register selector, This may also be
a constant (pref not).
DRAM : Word; { GUSBASE + $107 }
The address of the I/O port for GUS DRAM, this may also be
a constant (pref not).
GusDataConvert : Boolean;
A boolean which tells this routine to convert it's data
into 2cmp or not.
GusDataConvert = True -> Convert it into 2cmp
GusDataConvert = False -> Don't convert it into 2cmp
GusData16Bits : Boolean;
A boolean which tells this routine if the data is
16bits or 8bits, this is needed for converting the
data in 2cmp.
GusData16Bits = True -> The buffer is words
GusData16Bits = False -> The buffer is byts
!!! The Count from GusWrite is ALWAYS in bytes !!!
procedure GF1_OUT_BYTE; assembler;
(*
INPUT: AL -> GF1_REGISTER_SELECT
BL -> GF1_DATA
*)
asm
mov dx, GF1_REG_SELECT
out dx, al
inc dx
inc dx
mov al, bl
out dx, al
end;
procedure GusWrite (Address : LongInt; var Buffer; Count : Word); assembler;
(*
INPUT: Address -> Start position in GUS DRAM
Buffer -> linear array of bytes
Count -> How many bytes !!! or SIZEOF(Buffer)
*)
var
GusDataHigh : Boolean;
asm
(* PUSH ES *)
push es
(* SET REGISTERS CX:SI=ADDRESS ES:DI=BUFFER *)
mov si, [bp + offset Address + 0]
mov cx, [bp + offset Address + 2]
mov di, [bp + offset Buffer + 0]
mov es, [bp + offset Buffer + 2]
(* GUSDATAHIGH := FALSE *)
mov GusDataHigh, 1
(* ADDRESS HIGH *)
mov al, 44h
mov dx, GF1_REG_SELECT
out dx, al
inc dx
inc dx
mov al, cl
out dx, al
(* SELECT ADDRESS LOW *)
mov dx, GF1_REG_SELECT
mov al, 43h
out dx, al
@lab1:
(* ADDRESS LOW *)
mov dx, GF1_REG_SELECT
inc dx
mov ax, si
out dx, ax
(* READ BUFFER *)
mov al, es:[di]
inc di
(* 2CMP / 16BITS *)
cmp GusDataConvert, 0
je @signed
cmp GusData16Bits, 0
je @unsigned
dec GusDataHigh
jnz @unsigned
mov GusDataHigh, 2
jmp @signed
@unsigned:
xor al, 80h
@signed:
(* WRITE DRAM *)
mov dx, DRAM
out dx, al
(* INC ADDRESS *)
inc si
jnz @lab2
inc cx
(* ADDRESS HIGH *)
mov al, 44h
mov dx, GF1_REG_SELECT
out dx, al
inc dx
inc dx
mov al, cl
out dx, al
call GF1_OUT_BYTE
(* SELECT ADDRESS LOW *)
mov dx, GF1_REG_SELECT
mov al, 43h
out dx, al
@lab2:
(* LOOP UNTIL COUNT = 0 *)
dec Count
jnz @lab1
(* POP ES *)
pop es
end;
Keep On GUSing (with more source code to the PUBLIC)
Stanley Appel
------------------------------
Date: Fri, 28 Jan 1994 10:05:14 SAT
From: "Michael Patricios" <PATRICIO@odie.ee.wits.ac.za>
Subject: Reading voice while playing it - strange side effects
I have recently been writing a bit of a MOD player for the GUS and am
trying to put some oscilloscope type thingys, one for each channel.
The way I am doing this is to read the voice accumulator position and
then peek that address in GUS RAM. Works great, the only problem being
that when I draw the waveforms on the screen, I occassionally get
weird noises (kinda like "squeaks") coming from my GUS.
If I continuously read the voice position and peek the address, this
does not seem to happen, only if I am using graphics at the same time.
If I just draw a whole lot of crap on the screen without reading
anything from the GUS, it doen't seem to happen either. It only seems
to happen when I read AND use graphics!!!!!!!
Any ideas anybody??
I thought it might be my MOD playing routines so I took the source
for GUSPLAY 1.5 and modified it to do a similar thing and I did get
similar squeaks.
Is there perhaps a better way of drawing a scope on the screen???
Obviously all the sample data is in GUS RAM so I will definitely
need to peek it.
Oh yes, The graphics mode I am using at present is unchained vga
320x200x256 (a mode-x type mode).
Thanks for any input.
Michael Patricios
patricios@odie.ee.wits.ac.za
#include "clever_quote.h"
------------------------------
Date: Thu, 27 Jan 1994 08:33:43 -0500
From: ac151@freenet.carleton.ca (David Clarke)
Subject: Subscribe
subscribe
--
------------------------------ /''' --------------------------------
David Clarke c-00 davec@rflab.ee.ubc.ca
ac151@Freenet.carleton.ca > clarkec@sfu.ca dacl@mtsa.ubc.ca
------------------------------ - --------------------------------
------------------------------
Date: Thu, 27 Jan 1994 09:18 EST
From: 155722937@UCIS.VILL.EDU (LIFE IS A GREAT ADVENTURE)
Subject: subscribe
subscribe
------------------------------
End of GUS Programmer's Digest V8 #23
*************************************
To post to tomorrow's digest: <gus-sdk@dsd.es.com>
To (un)subscribe or get help: <gus-sdk-request@dsd.es.com>
To contact a human (last resort): <gus-sdk-owner@dsd.es.com>
FTP sites: archive.epas.utoronto.ca /pub/pc/ultrasound
wuarchive.wustl.edu /systems/ibmpc/ultrasound
archive.orst.edu /pub/packages/gravis
theoris.rz.uni-konstanz.de /pub/sound/gus
nctuccca.edu.tw /PC/ultrasound
FTP mail server: mail-server@nike.rz.uni-konstanz.de
Hints:
- Get the FAQ from the FTP sites or the request server.
- Mail to <gus-sdk-request@dsd.es.com> for info about other GUS
related mailing lists (general use, musician's, etc.).